package com.qtjf.qtmoneyservice.utils;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * Created by Administrator on 2016/12/21 0021.
 */

public class FirstTip {

    Context mContext;
    SharedPreferences sharedPreferences;

    public FirstTip(Context mContext, String fileName) {
        this.mContext = mContext;
        sharedPreferences = mContext.getSharedPreferences(fileName, Context.MODE_PRIVATE);
    }


    public void saveVipLevel(String key, String vipLevel) {
        SharedPreferences.Editor edit = sharedPreferences.edit();    //创建SharedPreferences.Editor对象
        edit.putString(key, vipLevel);        //存储数据
        edit.commit();
    }


    public String getVipLevel(String key) {
        String vipLevel = sharedPreferences.getString(key, "0");
        return vipLevel;
    }

}
